# 打印1到10的整数

# i = 1
# while i <= 10:
#     print(i)
#     i += 1

# 计算1到100的和
# i = 1
# sum = 0
# while i <= 100:
#     sum += i
#     i += 1
# print(sum)

# 计算5的阶乘
# i = 1
# mul = 1
# while i <= 5:
#     mul *= i
#     i += 1
# print(f'结果为：{mul}')

# 求1！+ 2！+ 3！+ ... + n!
n = int(input('请输入一个整数：'))
j = 1
r = 0
while j <= n:
    i = 1
    mul = 1
    while i <= j:
        mul *= i
        i += 1
    r += mul
    j += 1
print(f'结果是：{r}')
